package cn.edu.sdjzu.xg.eagle.dao;



import cn.edu.sdjzu.xg.eagle.entity.Pagination;
import cn.edu.sdjzu.xg.eagle.entity.School;
import cn.edu.sdjzu.xg.eagle.exception.BysjException;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Collection;


public interface SchoolDaoInterface {
    //返回id对应的School对象
    School find(Long id) throws SQLException, BysjException;

    //返回某页上的School对象
    //Collection<School> findAll(Pagination pagination) throws SQLException, BaseException ;

    // 返回School所有对象
    public Collection<School> findAll() throws SQLException, BysjException;

    //public Collection<School> findAll(Pagination pagination, List<Condition> conditionList) throws SQLException, BaseException;
    public boolean delete(Integer id) throws SQLException ;
    boolean update(Connection connection, School school) throws SQLException;
    boolean add(Connection connection, School school) throws SQLException;

    //boolean delete(School school) throws SQLException;
    public Collection<School> findAll(Pagination pagination) throws SQLException, BysjException;


}
